/*
* @Author: dengjiayao
* @Date:   2017-06-26 09:05:10
 * @Last Modified by: songwh
 * @Last Modified time: 2018-03-27 10:41:44
*/

import Vue from '../vue'
import store from '../vuex/store'
import { alert } from 'vue-strap'
import loginCheck from '../util/login-check'

import ItemList from './home-banner-list/item-list.vue'
import ItemConfig from './home-banner-config/item-config.vue'

new Vue({
  el: 'body',
  components: {
    'vue-alert-msg': alert,
    'vue-list': ItemList,
    'vue-config': ItemConfig
  },
  store,
  created() {
    loginCheck(this)
  },
  vuex: {
    getters: {
      msg: state => state.msg
    }
  },
  methods: {
    addItem() {
      var ref = this.$refs.homeBannerConfig
      ref.form = {
        type: '1',
        jumpUrl: '',
        picUrl: ''
      }
      ref.showModal = true
    }
  }
})
